﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace QuanLyPhongGiam
{
    public partial class frmBaoHanCacGiaiDoan : Form
    {
        int luaChonXemTinhTrang = -1;
        public frmBaoHanCacGiaiDoan()
        {
            InitializeComponent();
        }

        private void btnThoat_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnThiHanh_Click(object sender, EventArgs e)
        {
            switch (luaChonXemTinhTrang)
            {
                case 1: frmBaoHanLenhTamGiamDieuTra frmBaoHanLenhTamGiamDieuTra = new frmBaoHanLenhTamGiamDieuTra();
                    frmBaoHanLenhTamGiamDieuTra.Show();
                    this.Close();
                    break;
                case 2: frmBaoHanLenhTamGiamDieuTraGiaHan frmBaoHanLenhTamGiamDieuTraGiaHan = new frmBaoHanLenhTamGiamDieuTraGiaHan();
                    frmBaoHanLenhTamGiamDieuTraGiaHan.Show();
                    this.Close();
                    break;
                case 3: frmBaoHanLenhTamGiamDieuTraGiaHanLan2 frmBaoHanLenhTamGiamDieuTraGiaHanLan2 = new frmBaoHanLenhTamGiamDieuTraGiaHanLan2();
                    frmBaoHanLenhTamGiamDieuTraGiaHanLan2.Show();
                    this.Close();
                    break;
                case 4: frmBaoHanLenhTamGiamTruyTo frmBaoHanLenhTamGiamTruyTo = new frmBaoHanLenhTamGiamTruyTo();
                    frmBaoHanLenhTamGiamTruyTo.Show();
                    this.Close();
                    break;
                case 5: frmBaoHanLenhTamGiamTruyToGiaHan frmBaoHanLenhTamGiamTruyToGiaHan = new frmBaoHanLenhTamGiamTruyToGiaHan();
                    frmBaoHanLenhTamGiamTruyToGiaHan.Show();
                    this.Close();
                    break;
                case 6: frmBaoHanLenhTamGiamXetXu frmBaoHanLenhTamGiamXetXu = new frmBaoHanLenhTamGiamXetXu();
                    frmBaoHanLenhTamGiamXetXu.Show();
                    this.Close();
                    break;
                case 7: frmBaoHanLenhTamGiamXetXuGiaHan frmBaoHanLenhTamGiamXetXuGiaHan = new frmBaoHanLenhTamGiamXetXuGiaHan();
                    frmBaoHanLenhTamGiamXetXuGiaHan.Show();
                    this.Close();
                    break;
                case 8: frmBaoHanLenhTamGiamThiHanhAn frmBaoHanLenhTamGiamThiHanhAn = new frmBaoHanLenhTamGiamThiHanhAn();
                    frmBaoHanLenhTamGiamThiHanhAn.Show();
                    this.Close();
                    break;

                case 9: frmBaoHanLenhTamGiamDieuTraGiaHanLan3 frmBaoHanLenhTamGiamDieuTraGiaHanLan3 = new frmBaoHanLenhTamGiamDieuTraGiaHanLan3();
                    frmBaoHanLenhTamGiamDieuTraGiaHanLan3.Show();
                    this.Close();
                    break;
                case 10: frmBaoHanLenhTamGiamDieuTraGiaHanDacBiet frmBaoHanLenhTamGiamDieuTraGiaHanDacBiet = new frmBaoHanLenhTamGiamDieuTraGiaHanDacBiet();
                    frmBaoHanLenhTamGiamDieuTraGiaHanDacBiet.Show();
                    this.Close();
                    break;
                case 11: frmBaoHanLenhTamGiamDieuTraBoSung frmBaoHanLenhTamGiamDieuTraBoSung = new frmBaoHanLenhTamGiamDieuTraBoSung();
                    frmBaoHanLenhTamGiamDieuTraBoSung.Show();
                    this.Close();
                    break;
                case 12: frmBaoHanLenhTamGiamXetXuPhucTham frmBaoHanLenhTamGiamXetXuPhucTham = new frmBaoHanLenhTamGiamXetXuPhucTham();
                    frmBaoHanLenhTamGiamXetXuPhucTham.Show();
                    this.Close();
                    break;
                default: break;
            }
        }

        private void rdDieuTra_CheckedChanged(object sender, EventArgs e)
        {
            luaChonXemTinhTrang = 1;
        }

        private void rdGiaHanDieuTra_CheckedChanged(object sender, EventArgs e)
        {
            luaChonXemTinhTrang = 2;
        }

        private void rdGiaHanDieuTraLan2_CheckedChanged(object sender, EventArgs e)
        {
            luaChonXemTinhTrang = 3;
        }

        private void rdTruyTo_CheckedChanged(object sender, EventArgs e)
        {
            luaChonXemTinhTrang = 4;
        }

        private void rdGiaHanTruyTo_CheckedChanged(object sender, EventArgs e)
        {
            luaChonXemTinhTrang = 5;
        }

        private void rdXetXu_CheckedChanged(object sender, EventArgs e)
        {
            luaChonXemTinhTrang = 6;
        }

        private void rdGiaHanXetXu_CheckedChanged(object sender, EventArgs e)
        {
            luaChonXemTinhTrang = 7;
        }

        private void rdThiHanhAn_CheckedChanged(object sender, EventArgs e)
        {
            luaChonXemTinhTrang = 8;
        }

        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {
            luaChonXemTinhTrang = 9;
        }

        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {
            luaChonXemTinhTrang = 10;
        }

        private void radioButton3_CheckedChanged(object sender, EventArgs e)
        {
            luaChonXemTinhTrang = 11;
        }

        private void radioButton4_CheckedChanged(object sender, EventArgs e)
        {
            luaChonXemTinhTrang = 12;
        }
    }
}
